// 不同设备宽度，设置不同的html字体大小，方便后续使用rem单位
@media screen and (min-width: 320px) {
    html {
        font-size: 21px;
    }
}

@media screen and (min-width: 360px) {
    html {

        font-size: 24px;
    }
}


@media screen and (min-width: 375px) {
    html {
        font-size: 25px;
    }
}



html {
    -webkit-text-size-adjust: none;
    overflow-y: scroll;
}

body {
    max-width: 375px;
    min-width: 320px;
    line-height: 1.5;
    color: #333333;
    font-family: Arial, Helvetica, STHeiTi, sans-serif;
    background: #f2f2f2;
    font-size: 12px;
    padding-bottom: 10rem;
    margin: 0 auto;
}

ul,
li,
ul li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    color: #333;
}

p {
    margin: 0;
    padding: 0;
}

img {
    // width: 100%;
    height: auto;
}


// 头部
.header {
    width: 100%;
    height: 3.6rem;
    overflow: hidden;
    position: relative;
    background: url('../imgs/header-bg.png') no-repeat;
    background-size: 100% 100%;

    // 顶部 的内容
    &-top {
        width: 13.64rem;
        height: 1.76rem;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;

        img {
            width: 0.72rem;
            height: 1.2rem;
        }

        a:nth-child(2) {
            img {
                width: 7.8rem;
                height: 1.52rem;
            }
        }

    }

    // 搜索框
    &-search {
        width: 100%;
        height: 1.84rem;
        padding: 0 0.48rem;
        box-sizing: border-box;
        display: flex;
        align-items: center;

        &-border {
            width: 100%;
            height: 1.28rem;
            border-radius: 99px;
            background: #fff;
            display: flex;
            align-items: center;
            padding-left: 0.4rem;
            box-sizing: border-box;

            i {
                display: inline-block;
                width: 0.72rem;
                height: 0.72rem;
                background: url('../imgs/search.png') no-repeat;
                background-size: 100% 100%;
            }

            input {
                border: none;
                outline: none;
                font-size: 0.6rem;
                margin-left: 0.2rem;
            }
        }
    }
}

// 分类
.category {
    width: 100%;
    height: 6.4rem;
    background: url('../imgs/c-bg.png') no-repeat;
    background-size: 100% 100%;
    display: flex;
    flex-wrap: wrap;

    li {
        width: 20%;
        height: 2.84rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        img {
            margin-top: 0.3rem;
            width: 1.68rem;
            height: 1.68rem;
        }

        p {
            font-size: 0.44rem;
        }
    }
}

// 广告
.banner {
    width: 100%;
    height: 5.615rem;
    display: flex;

    a {
        display: inline-block;
        flex: 1;

        img {
            width: 100%;
            height: 100%;
        }
    }

}

// 还是广告
.banner2 {
    width: 14.04rem;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.36rem;

    li {
        width: 6.84rem;
        height: 4.2rem;
    }

    li:nth-child(1) {
        box-sizing: border-box;
        padding: 0.92rem 0 0 0.24rem;
        background: url('../imgs/b2-li1.png') no-repeat;
        background-size: 100% 100%;

        a {
            display: inline-block;
            width: 3.08rem;
            height: 3.08rem;
            position: relative;

            img {
                width: 100%;
                height: 100%;
            }

            span {
                display: inline-block;
                background: #FFEBEB;
                padding: 0 0.2rem;
                border-radius: 1rem;
                color: #FF0000;
                font-size: 0.44rem;
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
            }
        }


    }

    li:nth-child(2) {
        display: flex;

        a {
            display: inline-block;
            width: 50%;
            height: 100%;
            background: url('../imgs/cjg.png') no-repeat;
            background-size: 100% 100%;
            position: relative;

            img {
                width: 2.72rem;
                height: 2.72rem;
                margin-top: 1.12rem;
                margin-left: 0.35rem;
            }

            span {
                width: 2.72rem;
                font-size: 0.44rem;
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                background: #FFF6ED;
                color: #B95A17;
            }
        }

        a:nth-child(2) {
            background: url('../imgs/suning.png') no-repeat;
            background-size: 100% 100%;
        }
    }
}

// 轮播图部分
.swiper {
    width: 14.04rem;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: space-between;

    &-imgs {
        width: 6.84rem;
        height: 8.76rem;

        img {
            width: 100%;
            height: 100%;
        }
    }

    &-lis {
        width: 6.84rem;
        height: 8.76rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        img {
            width: 2.4rem;
            height: 2.4rem;
        }

        li {
            display: flex;
            width: 100%;
            height: 4.2rem;
            background: url('../imgs/swiper-li.png') no-repeat;
            background-size: 100% 100%;

            div {
                width: 50%;
                height: 100%;
                position: relative;

                p:first-child {
                    position: absolute;
                    // top: -1.96rem;
                    left: 0;
                    display: block;
                    width: 3.12rem;
                    line-height: 0.96rem;
                    text-align: center;
                    font-size: 0.52rem;
                    font-weight: 700;
                    color: #fff;

                }

                img {
                    position: absolute;
                    top: 1.2rem;
                    left: 0.55rem;
                }

                p:last-child {
                    width: 2.4rem;
                    color: #fff;
                    border-radius: 1rem;
                    position: absolute;
                    text-align: center;
                    bottom: 0.2rem;
                    left: 50%;
                    transform: translateX(-50%);
                    background: #FF7164;
                }
            }
        }
    }
}


// 猜你喜欢
.like {
    width: 14.04rem;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    position: relative;

    // 标题
    &-title {
        width: 100%;
        height: 1.2rem;
        margin-top: 0.5rem;

        img {
            width: 100%;
            height: 100%;
        }
    }

    // 内容
    &-content {
        width: 100%;
        height: auto;
        overflow: hidden;
        position: relative;
    }

    #water {
        width: 100%;

        // display: flex;
        // justify-content: space-between;
        li:nth-child(1) {
            float: left;
        }


        li:nth-child(2) {
            float: right;
        }

        .lis-details {
            width: 6.84rem;
            border-radius: 0.3rem;
            background-color: #fff;
            overflow: hidden;
            padding-bottom: 0.3rem;
            margin-bottom: 0.5rem;

            img {
                width: 6.84rem;
                height: 6.84rem;
            }

            // 标题
            p {
                box-sizing: border-box;
                padding: 0 0.3rem;
                font-size: 0.52rem;
                font-weight: 600;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                white-space: normal;
            }

            // 小标签
            .tag {
                box-sizing: border-box;
                padding: 0.3rem 0.3rem;

                span {
                    display: inline-block;
                    border-radius: 0.2rem;
                    height: 0.48rem;
                    padding: 0.04rem 0.24rem;
                    line-height: .48rem;
                    border: 1px solid #FFBB00;
                    background: #FEFBEE;
                }
            }

            // 价格
            .price {
                box-sizing: border-box;
                padding: 0 0.3rem;
                display: flex;
                align-items: center;

                span:nth-child(1) {
                    font-size: 0.72rem;
                    line-height: 0.72rem;
                    color: #FF4422;
                    font-weight: 600;

                    i {
                        font-style: normal;
                        font-size: 0.48rem;
                    }
                }

                span:nth-child(2) {
                    color: #999999;
                    margin-left: 0.26rem;
                    font-size: 0.4rem;
                }
            }

            // 额外的内容
            .extra {
                padding: 0 0.3rem;
                font-size: 0.6rem;
                font-weight: bold;
                color: purple;
            }
        }

    }
}

// tabbar选项卡
.tabbar {
    max-width: 375px;
    min-width: 320px;
    position: fixed;
    bottom: 0;
    // left: 0px;
    width: 100%;
    height: 50px;
    display: flex;
    background: #fff;
    box-shadow: 0px 0px 3px #ccc;

    li {
        width: 20%;
        height: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;

        a {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        img {
            width: 0.96rem;
            height: 0.96rem;
        }

        p {
            font-size: 0.4rem;
        }
    }
}